if #msg!="menu"
  MoveTo #hpos$,#vpos$-7
  cell LinkButton
  set border shadowlesssquare width 29 height 29
  set TextExpression @this.RESN
  set Autoreload YES
  #rhelp=@contents
  if @contents = "locked"
    image "locked"
    #rhelp="Locked"
  else if @contents = "privacy"
    image "private"
    #rhelp="Privacy"
  else if @contents = "confidential"
    image "private"
    #rhelp="Confidential"
  else
    image "unlocked"
    #rhelp="No Restrictions"
  endif
  MenuLink "Attach Restriction"
  #rhelp = local(#rhelp)&"; "&local("click to change record restriction")
  help #rhelp
else
  NewLine
  cell static,local("RESN")&":"
  set tabwidth -1 alignment right

  cell PopupMenuEdit
  MenuItems local("No Restrictions")&"::"
  MenuItems local("Confidential")&":confidential"
  MenuItems local("Locked")&":locked"
  MenuItems local("Privacy")&":privacy"
  SizeToFit
  help local("Click to set restriction for this event")
endif
